package com.lbn.monitor.app.history.adapter;

import android.content.Context;

import com.lbn.monitor.R;
import com.lbn.monitor.api.model.Pollutant;

import java.util.List;

import indi.free.widgets.custom_recycler_view.BaseRecyclerAdapter;
import indi.free.widgets.custom_recycler_view.RecyclerViewHolder;

/**
 * @author 李炳南
 * @date 2017/3/7
 */
public class PollutantAdapter extends BaseRecyclerAdapter<Pollutant> {


    public PollutantAdapter(Context ctx, List<Pollutant> list) {
        super(ctx, list);
    }

    @Override
    public int getItemLayoutId(int viewType) {
        return R.layout.layout_itme_popup_history;
    }

    @Override
    public void bindData(RecyclerViewHolder holder, int position, Pollutant item) {
        holder.getTextView(R.id.content).setText(item.getPollutantsFactor());
    }
}
